import bus from '@/bus'
let data = {
    status: 'pass',
    totalItem: 1,
    pageSize: window.$pageSize,
    currentPage: 1,
    columns: [{
        title: '标签名称',
        key: 'name',
        minWidth: 200
    }, {
        title: '标签背景',
        key: 'color',
        align: 'left',
        minWidth: 150,
        render:(h,params)=>{
            return h('div', {
                style:{width:40+'px',height:40+'px',background:params.row.color}
            })
        }
    }, {
        title: '操作',
        align: 'right',
        minWidth: 160,
        render:(h,params) => {
            return h('div',[
                h('Button', {
                    class: 'mr',
                    props:{
                        size:'small',
                        type:'primary'
                    },
                    on: {
                        click: () => {
                            bus.$emit('onEdit', params.row.id)
                        }
                    }
                }, '编辑'),
                h('Button', {
                    props:{
                        size:'small',
                        type: 'warning'
                    },
                    on: {
                        click: () => {
                            bus.$emit('onDelete', params.row.id, params.row.name, params.index)
                        }
                    }
                }, '删除')
            ])
        }
    }],
    data: []
}
export default data